import { http } from '@/utils/request'

// 任务相关API
export const jobApi = {
  // 最近任务
  getRecentJoblist() {
    return http.get(`/jobgetRecentJoblist`)
  },
  addOneJob: (formData) => {
    return http.post('/job/add', formData)
  },
  list: (page,limit) => {
    return http.get(`/job/list?page=${page}&limit=${limit}`)
  },
  toplist: () => {
    return http.get(`/job/toplist`)
  },
  cancel: (id) => {
    return http.get(`/job/cancel?id=${id}`)
  },
  exclute: (id) => {
    return http.get(`/job/exclute?id=${id}`)
  },
  delete: (id) => {
    return http.get(`/job/delete?id=${id}`)
  },
}